/*
 * distance.h
 *
 *  Created on: May 22, 2021
 *      Author: kirk_
 */

#ifndef DISTANCE_H_
#define DISTANCE_H_

#include "config.h"

#define Distance_OutRange_Period 10U
#define Distance_InRange_Period 0U

uint32_t Distance_Get(uint8_t index);
uint16_t DistanceAccumulate(uint16_t d, uint16_t c);
uint32_t DistanceAdjust(void);
void DistanceGetAverage(uint8_t times, uint8_t interval, uint32_t* d1, uint32_t* d2);
uint32_t DistanceAverage(uint8_t index, uint8_t times, uint8_t interval);
uint8_t DistanceGetAngle(double *angle);
uint8_t DistanceGetAngleUsmart(void);
#endif /* DISTANCE_H_ */
